home *** CD-ROM | disk | FTP | other *** search
/ PCMania 55 / PCMania CD55_3.iso / vfw1.1e / setup.mst < prev    next >
Text File  |  1994-09-01  |  18KB  |  457 lines

  1. '**************************************************************************
  2. '*                       VfW 1.1 Setup
  3. '**************************************************************************
  4. '$INCLUDE 'setupapi.inc'
  5. '$INCLUDE 'mscpydis.inc'    ''System
  6. '$INCLUDE 'msdetect.inc'    ''Detects Available Disk Space
  7.  
  8. ''Dialog ID's
  9. CONST WELCOME       = 100
  10. CONST ASKQUIT       = 200
  11. CONST DESTPATH      = 300
  12. CONST EXITFAILURE   = 400
  13. CONST EXITQUIT      = 600
  14. CONST EXITSUCCESS   = 700
  15. CONST OPTIONS       = 800
  16. CONST APPHELP       = 900
  17. CONST APPHELP2      = 1500
  18. CONST APPHELP3      = 1700
  19. CONST CHECK         = 2500
  20. CONST SMALLDEST     = 2100
  21. CONST SMALLWIN      = 2200
  22. CONST BADPATH       = 6400
  23. CONST RESTART       = 2600
  24. CONST RESTARTII     = 2700
  25.  
  26. ''Bitmap ID
  27. CONST LOGO = 1
  28.  
  29. GLOBAL File1
  30. GLOBAL SizeReq&  '' Total Disk Size required for installation
  31.  
  32. ''File Types
  33. GLOBAL DEST$        ''Default destination directory.
  34. GLOBAL WinDir$
  35. GLOBAL WinSysDir$
  36. GLOBAL WinSys32Dir$
  37. GLOBAL WINDRIVE$    ''Windows Drive Letter.
  38. GLOBAL OPTCUR$      ''Option selection from option dialog.
  39. GLOBAL CHECKSTATES$
  40. GLOBAL CUIDLL$
  41. GLOBAL MinorVer%
  42. GLOBAL OnNT$
  43.  
  44. DECLARE SUB Install
  45. DECLARE FUNCTION MakePath (szDir$, szFile$) AS STRING
  46. DECLARE FUNCTION OnWindowsNT LIB "INIUPD.DLL" AS INTEGER
  47. DECLARE FUNCTION VflatdPresent LIB "iniupd.DLL" AS INTEGER
  48. DECLARE SUB Reboot LIB "iniupd.dll"
  49. DECLARE fUNCTION ExitWindowsExec  LIB "User" (Exec$, Param$) AS INTEGER
  50.  
  51. INIT:
  52.   
  53.     CUIDLL$ = "mscuistf.dll"            ''Custom user interface dll
  54.     HELPPROC$ = "FHelpDlgProc"          ''Help dialog procedure
  55.     
  56.     WIN32ENABLED% = 0
  57.     MajorVer% = GetWindowsMajorVersion()
  58.     MinorVer% = GetWindowsMinorVersion()
  59.     Processor% = GetProcessorType()
  60.     WinDir$ = GetWindowsDir()
  61.     DEST$ = GetWindowsDir()
  62.     WinSysDir$ = GetWindowsSysDir()
  63.     WinSys32Dir$ = WinDir$ + "system32"
  64.  
  65.     IF MajorVer% < 3 OR (MajorVer% = 3 AND MinorVer% < 10) THEN
  66.     i% = DoMsgBox("Microsoft Windows version 3.10 or greater is required for this software.  Please upgrade your version of Windows.", "Installation Problem", MB_OK+MB_TASKMODAL+MB_ICONHAND)
  67.     END
  68.     END IF
  69.  
  70.     'Prevents installation on 286
  71.     IF Processor% < 3 THEN
  72.     i% = DoMsgBox("Video for Windows requires a 386 or greater processor or emulator.", "Installation Problem", MB_OK+MB_TASKMODAL+MB_ICONHAND)
  73.     END
  74.     END IF
  75.  
  76.     ' Use Wowexec to determine version of NT.  3.1 did not stamp wowexec and wow returns 3.1 as version
  77.     IF OnWindowsNT() THEN
  78.       OnNT$ = "TRUE"
  79.       WowVersion$ = GetVersionOfFile(WinSys32Dir$ + "\wowexec.exe")
  80.       IF WowVersion$ = "" THEN
  81.          i% = DoMsgBox("Video for Windows does not run on Windows NT 3.1.  Please upgrade your version of Windows.", "Installation Problem", MB_OK+MB_TASKMODAL+MB_ICONHAND)
  82.          END
  83.       END IF
  84.     END IF
  85.  
  86.     SetBitmap CUIDLL$, LOGO
  87.     SetTitle "Video for Windows 1.1"
  88.  
  89.     szInf$ = GetSymbolValue("STF_SRCINFPATH")
  90.     IF szInf$ = "" THEN
  91.        szInf$ = GetSymbolValue("STF_CWDDIR") + "SETUP.INF"
  92.     END IF
  93.     ReadInfFile szInf$
  94.  
  95.     WINDRIVE$ = MID$(GetWindowsDir, 1, 1)
  96.     DEST$ = WINDRIVE$ + ":\WINVIDEO"
  97.     OPTCUR$ = "2"                         '' Set default option to Playback and Video Tools
  98.  
  99. WELCOME:
  100.     sz$ = UIStartDlg(CUIDLL$, WELCOME, "FInfoDlgProc", APPHELP, HELPPROC$)
  101.     IF sz$ = "CONTINUE" THEN
  102.        UIPop 1
  103. WELCOMEL1:
  104.     '' Get user and company name...
  105.        IF InitSystem(1, "", 0) = 0 THEN
  106.       GOSUB ASKQUIT
  107.       GOTO WELCOMEL1
  108.        END IF
  109.      ELSE
  110.     GOSUB ASKQUIT
  111.     GOTO WELCOME
  112.     END IF
  113.  
  114. '' Set the default value for the Sample Files RADIO Button.
  115.     AddListItem "CheckItemsIn", "ON"
  116.  
  117. OPTION:
  118.     SetSymbolValue "RadioDefault", OPTCUR$
  119. OPTL1:
  120.     sz$ = UIStartDlg(CUIDLL$, OPTIONS, "FRadioDlgProc", APPHELP2, HELPPROC$)
  121.     OPTCUR$ = GetSymbolValue("ButtonChecked")
  122.  
  123.     IF sz$ = "CONTINUE" THEN
  124.        UIPop(1)
  125.     ELSEIF sz$ = "REACTIVATE" THEN
  126.        GOTO OPTL1
  127.     ELSE
  128.        GOSUB ASKQUIT
  129.        GOTO OPTION
  130.     END IF
  131.  
  132. AVIFiles:
  133.     sz$ = UIStartDlg(CUIDLL$, CHECK, "FCheckDlgProc", 0, "")
  134.  
  135. '' Re-set file selection based on the user selection in case she decides to go back
  136. '' to the previous dialog box
  137.     SetSymbolValue "CheckItemsIn", GetListItem("CheckItemsOut", 1)
  138.     IF sz$ = "CONTINUE" THEN
  139.        UIPop 1
  140.     ELSEIF sz$ = "BACK" then
  141.        UIPop 1
  142.        GOTO OPTION
  143.     ELSEIF sz$ = "REACTIVATE" THEN
  144.        GOTO AVIFiles
  145.     ELSE
  146.        GOSUB ASKQUIT
  147.        GOTO AVIFiles
  148.     END IF
  149.  
  150. GETPATH:
  151.     SetSymbolValue "EditTextIn", DEST$
  152.     SetSymbolValue "EditFocus", "END"
  153. GETPATHL1:
  154.     sz$ = UIStartDlg(CUIDLL$, DESTPATH, "FEditDlgProc", APPHELP3, HELPPROC$)
  155.     DEST$ = GetSymbolValue("EditTextOut")
  156.  
  157.     IF sz$ = "CONTINUE" THEN
  158.        IF IsDirWritable(DEST$) = 0 THEN
  159.       GOSUB BADPATH
  160.       GOTO GETPATHL1
  161.        END IF
  162.        UIPop 1
  163.     ELSEIF sz$ = "REACTIVATE" THEN
  164.        GOTO GETPATHL1
  165.     ELSEIF sz$ = "BACK" THEN
  166.        UIPop 1
  167.        GOTO AVIFiles
  168.     ELSE
  169.        GOSUB ASKQUIT
  170.        GOTO GETPATH
  171.     END IF
  172.  
  173. ''Prepare Copy list and check size
  174.  
  175.     ClearCopyList
  176.     SrcDir$ = GetSymbolValue("STF_SRCDIR")
  177.     WinDir$ = GetWindowsDir()
  178.     WinSysDir$ = GetWindowsSysDir()
  179.  
  180. '' Remove DCISVGA file
  181.     AddSectionFilesToCopyList "remove", SrcDir$, WinSysDir$
  182.  
  183. ''  Runtime files (on Windows disk)
  184. ''  Do not install OLE or MPlayer if on next release of NT or Windows
  185.  
  186.     IF ((NOT OnNT$ = "TRUE") AND MinorVer% < 50) THEN            'These files not necessary on Windows NT
  187.     AddSectionFilesToCopyList "MPlayer", SrcDir$, WinDir$
  188.     AddSectionFilesToCopyList "OLE2", SrcDir$, WinSysDir$
  189.     END IF
  190.     AddSectionFilesToCopyList "VfW Runtime", SrcDir$, WinSysDir$
  191.     AddSectionFilesToCopyList "ACM Drivers", SrcDir$, WinSysDir$
  192.     AddSectionFilesToCopyList "AVICodecs", SrcDir$, WinSysDir$
  193.     AddSectionFilesToCopyList "RleComp", SrcDir$, WinSysDir$
  194.     IF OnNT$ = "TRUE" THEN
  195.     AddSectionFilesToCopyList "NT MSVideo", SrcDir$, WinSys32Dir$
  196.     ENDIF
  197.  
  198. ''    TOOLS (on Windows disk)
  199.     IF OPTCUR$ = "2" THEN
  200.        AddSectionFilesToCopyList "MBrowser", SrcDir$, WinDir$
  201.        AddSectionFilesToCopyList "MBrowser Bitmaps", SrcDir$, WinSysDir$
  202.        AddSectionFilesToCopyList "ScrnCap Driver", SrcDir$, WinSysDir$
  203.        AddSectionFilesToCopyList "Videdit tools", SrcDir$, WinSysDir$
  204.     END IF
  205.  
  206. ''  Check windrive diskspace
  207.     SizeReq& = GetCopyListCost ("","", "")
  208.     IF SizeReq& <> 0 THEN
  209.     GOSUB SMALLWIN
  210.     END
  211.     END IF
  212.  
  213. '' Destination drive
  214. ''  AVI sample file and release notes
  215.     IF GetListItem("CheckItemsOut", 1) = "ON" THEN
  216.        AddSectionFilesToCopyList "AVI Sample", SrcDir$, DEST$
  217.        File1 = 1
  218.        AddSectionFilesToCopyList "ReadMe1", SrcDir$, DEST$
  219.     ELSE
  220.        File1 = 0
  221.        AddSectionFilesToCopyList "ReadMe", SrcDir$, DEST$
  222.     END IF
  223.  
  224. '' Tools
  225.     IF OPTCUR$ = "2" THEN
  226.        AddSectionFilesToCopyList "VidEdit", SrcDir$, DEST$
  227.        AddSectionFilesToCopyList "VidCap", SrcDir$, DEST$
  228.        AddSectionFilesToCopyList "ScrnCap", SrcDir$, DEST$
  229.     END IF
  230. ''  Check destination drive size
  231.     SizeReq& = GetCopyListCost ("","", "")
  232.     IF SizeReq& <> 0 THEN
  233.        GOSUB SMALLDEST
  234.        GOTO GETPATH
  235.     END IF
  236.  
  237. Install
  238.  
  239. '' Restart Windows: if it has to updates ACM from DOS, it restarts Windows automatically
  240. '' else, it gives the user the choice
  241.     RESTRT% = RestartListEmpty ()
  242.     Exe$ = DEST$ + "\_msrstrt.exe"
  243.     Batch$ = DEST$ + "\_mssetup.bat"
  244.     empty$ = ""
  245. RESTART:
  246.     IF RESTRT% = 0 THEN
  247.        sz$ = UIStartDlg(CUIDLL$, RESTART, "FInfo0DlgProc", 0, "")
  248.        IF sz$ = "REACTIVATE" THEN
  249.       GOTO RESTART
  250.        ENDIF
  251.        I% = ExitExecRestart ()
  252.        RemoveFile Exe$, cmoForce
  253.        RemoveFile Batch$, cmoForce
  254.        END
  255.     ELSE
  256.        sz$ = UIStartDlg(CUIDLL$, RESTARTII, "FQuitDlgProc", 0, "")
  257.        IF sz$ = "CONTINUE" THEN
  258.       I% = ExitWindowsExec (Exe$, empty$)
  259.       IF I% = 0 THEN
  260.          GOTO RESTART
  261.       ELSE
  262.          END
  263.      ENDIF
  264.        ELSEIF sz$ = "EXIT" THEN
  265.       UIPopAll
  266.       END
  267.        ELSEIF sz$ = "REACTIVATE" THEN
  268.       GOTO RESTART
  269.        ELSE
  270.       UIPop 1
  271.        END IF
  272.     END IF
  273.  
  274.  
  275. QUIT:
  276.     ON ERROR GOTO ERRQUIT
  277.  
  278.     IF ERR = 0 THEN
  279.     dlg% = EXITSUCCESS
  280.     ELSEIF ERR = STFQUIT THEN
  281.     dlg% = EXITQUIT
  282.     ELSE
  283.     dlg% = EXITFAILURE
  284.     END IF
  285. QUITL1:
  286.     sz$ = UIStartDlg(CUIDLL$, dlg%, "FInfo0DlgProc", 0, "")
  287.     IF sz$ = "REACTIVATE" THEN
  288.     GOTO QUITL1
  289.     END IF
  290.     UIPop 1
  291.     END
  292.  
  293. ERRQUIT:
  294.     i% = DoMsgBox("An installation problem occured, call the product support service", "Setup Problem", MB_OK+MB_TASKMODAL+MB_ICONHAND)
  295.     END
  296.  
  297. BADPATH:
  298.     sz$ = UIStartDlg(CUIDLL$, BADPATH, "FInfo0DlgProc", 0, "")
  299.     IF sz$ = "REACTIVATE" THEN
  300.     GOTO BADPATH
  301.     END IF
  302.     UIPop 1
  303.     RETURN
  304.  
  305. ASKQUIT:
  306.     sz$ = UIStartDlg(CUIDLL$, ASKQUIT, "FQuitDlgProc", 0, "")
  307.  
  308.     IF sz$ = "EXIT" THEN
  309.     UIPopAll
  310. ''        ERROR STFQUIT
  311.     END
  312.     ELSEIF sz$ = "REACTIVATE" THEN
  313.     GOTO ASKQUIT
  314.     ELSE
  315.     UIPop 1
  316.     END IF
  317.     RETURN
  318.  
  319. SMALLDEST:
  320.     sz$ = UIStartDlg(CUIDLL$, SMALLDEST, "FInfo0DlgProc", 0, "")
  321.     IF sz$ = "REACTIVATE" THEN
  322.     GOTO SMALLDEST
  323.     END IF
  324.     UIPop 1
  325.     RETURN
  326.  
  327. SMALLWIN:
  328.     sz$ = UIStartDlg(CUIDLL$, SMALLWIN, "FInfo0DlgProc", 0, "")
  329.     IF sz$ = "REACTIVATE" THEN
  330.     GOTO SMALLWIN
  331.     END IF
  332.     UIPop 1
  333.     RETURN
  334.  
  335. '**
  336. '** Purpose:
  337. '**     Performs all installation operations.
  338. '** Arguments:
  339. '**     none.
  340. '** Returns:
  341. '**     none.
  342. '*************************************************************************
  343. SUB Install STATIC
  344.  
  345.     CreateDir DEST$, cmoNone
  346.     SetRestartDir DEST$
  347.     CopyFilesInCopyList
  348.  
  349. ''Updating WIN.INI and SYSTEM.INI
  350. IF ((NOT OnNT$ = "TRUE") AND MinorVer% < 50) THEN
  351.     IF VflatdPresent() = 0 THEN
  352.        CreateSysIniKeyValue WinDir$ + "system.ini", "386Enh", "device", "dva.386", cmoOverwrite
  353.     END IF
  354. END IF
  355.     CreateIniKeyValue WinDir$ + "system.ini", "Drivers", "VIDC.CVID", "iccvid.drv", cmoOverwrite
  356.     CreateIniKeyValue WinDir$ + "system.ini", "Drivers", "VIDC.MSVC", "msvidc.drv", cmoOverwrite
  357.     CreateIniKeyValue WinDir$ + "system.ini", "Drivers", "VIDC.IV32", "ir32.dll", cmoOverwrite
  358.     CreateIniKeyValue WinDir$ + "system.ini", "Drivers", "VIDC.IV31", "IR32.dll", cmoOverwrite
  359.     CreateIniKeyValue WinDir$ + "system.ini", "Drivers", "VIDC.MRLE", "MSRLE.drv", cmoOverwrite
  360.     I% = DoesIniKeyExist ("system.ini", "Drivers", "VIDC.RT21")
  361.     IF I% = 0  THEN
  362.        CreateIniKeyValue WinDir$ + "system.ini", "Drivers", "VIDC.RT21", "ir21_r.dll", cmoOverwrite
  363.     END IF
  364.     CreateIniKeyValue WinDir$ + "system.ini", "Drivers", "VIDC.YVU9", "ir21_r.dll", cmoOverwrite
  365.     CreateIniKeyValue "WIN.INI", "mci extensions", "avi", "AVIVideo", cmoOverwrite
  366.     CreateIniKeyValue WinDir$ + "system.ini", "mci", "AVIVideo", "mciavi.drv", cmoOverwrite
  367.     CreateIniKeyValue WinDir$ + "system.ini", "Drivers", "WaveMapper", "msacm.drv", cmoOverwrite
  368.     CreateIniKeyValue WinDir$ + "system.ini", "Drivers", "MSACM.msadpcm", "msadpcm.acm", cmoOverwrite
  369.     CreateIniKeyValue WinDir$ + "system.ini", "Drivers", "MSACM.imaadpcm", "imaadpcm.acm", cmoOverwrite
  370.     CreateIniKeyValue WinDir$ + "control.ini", "drivers.desc", "msacm.drv", "Microsoft Sound Mapper V2.00", cmoOverwrite
  371.     CreateIniKeyValue WinDir$ + "control.ini", "drivers.desc", "msadpcm.acm", "Microsoft ADPCM Codec V2.00", cmoOverwrite
  372.     CreateIniKeyValue WinDir$ + "control.ini", "drivers.desc", "imaadpcm.acm", "Microsoft IMA ADPCM Codec V2.00", cmoOverwrite
  373.     IF OPTCUR$ = "2" THEN
  374.      CreateIniKeyValue WinDir$ + "MBROWSER.INI", "Collections", "Video_for_Windows_1.1_Amazing_Events", "VFW11SAMPLE,\AMAZING.MBR,vidclip.bmp,Video for Windows 1.1 Amazing Events,Video for Windows 1.1 CD-ROM",cmoOverwrite
  375.      CreateIniKeyValue WinDir$ + "MBROWSER.INI", "Collections", "Video_for_Windows_1.1_America_the_Beautiful", "VFW11SAMPLE,\AMERICA.MBR,vidclip.bmp,Video for Windows 1.1 America the Beautiful,Video for Windows 1.1 CD-ROM",cmoOverwrite
  376.      CreateIniKeyValue WinDir$ + "MBROWSER.INI", "Collections", "Video_for_Windows_1.1_Miscellaneous", "VFW11SAMPLE,\misc.MBR,funclip.bmp,Video for Windows 1.1 Miscellaneous,Video for Windows 1.1 CD-ROM",cmoOvewrwrite
  377.      CreateIniKeyValue WinDir$ + "MBROWSER.INI", "Collections", "Video_for_Windows_1.1_Business", "VFW11SAMPLE,\BUSINESS.MBR,vidclip.bmp,Video for Windows 1.1 Business,Video for Windows 1.1 CD-ROM",cmoOvewrwrite
  378.      CreateIniKeyValue WinDir$ + "MBROWSER.INI", "Collections", "Video_for_Windows_1.1_Faces", "VFW11SAMPLE,\FACES.MBR,vidclip.bmp,Video for Windows 1.1 Faces,Video for Windows 1.1 CD-ROM",cmoOvewrwrite
  379.      CreateIniKeyValue WinDir$ + "MBROWSER.INI", "Collections", "Video_for_Windows_1.1_Movie_Clips", "VFW11SAMPLE,\MOVIES.MBR,funclip.bmp,Video for Windows 1.1 Movie Clips,Video for Windows 1.1 CD-ROM",cmoOvewrwrite
  380.      CreateIniKeyValue WinDir$ + "MBROWSER.INI", "Collections", "Video_for_Windows_1.1_Musical_Performances", "VFW11SAMPLE,\MUSIC.MBR,funclip.bmp,Video for Windows 1.1 Musical Performances,Video for Windows 1.1 CD-ROM",cmoOvewrwrite
  381.      CreateIniKeyValue WinDir$ + "MBROWSER.INI", "Collections", "Video_for_Windows_1.1_Nature", "VFW11SAMPLE,\NATURE.MBR,vidclip.bmp,Video for Windows 1.1 Nature,Video for Windows 1.1 CD-ROM",cmoOvewrwrite
  382.      CreateIniKeyValue WinDir$ + "MBROWSER.INI", "Collections", "Video_for_Windows_1.1_Our_National_Parks", "VFW11SAMPLE,\PARKS.MBR,funclip.bmp,Video for Windows 1.1 Our National Parks,Video for Windows 1.1 CD-ROM",cmoOvewrwrite
  383.      CreateIniKeyValue WinDir$ + "MBROWSER.INI", "Collections", "Video_for_Windows_1.1_Places", "VFW11SAMPLE,\PLACES.MBR,vidclip.bmp,Video for Windows 1.1 Places,Video for Windows 1.1 CD-ROM",cmoOvewrwrite
  384.      CreateIniKeyValue WinDir$ + "MBROWSER.INI", "Collections", "Video_for_Windows_1.1_Science", "VFW11SAMPLE,\SCIENCE.MBR,vidclip.bmp,Video for Windows 1.1 Science,Video for Windows 1.1 CD-ROM",cmoOvewrwrite
  385.      CreateIniKeyValue WinDir$ + "MBROWSER.INI", "Collections", "Video_for_Windows_1.1_Seasons", "VFW11SAMPLE,\SEASONS.MBR,vidclip.bmp,Video for Windows 1.1 Seasons,Video for Windows 1.1 CD-ROM",cmoOvewrwrite
  386.     CreateIniKeyValue WinDir$ + "MBROWSER.INI", "Collections", "Video_for_Windows_1.1_Sharks:_Killers_of_the_Deep", "VFW11SAMPLE,\SHARKS.MBR,funclip.bmp,Video for Windows 1.1 Sharks: Killers of the Deep,Video for Windows 1.1 CD-ROM",cmoOvewrwrite
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.      CreateIniKeyValue WinDir$ + "MBROWSER.INI", "Collections", "Video_for_Windows_1.1_Space", "VFW11SAMPLE,\SPACE.MBR,vidclip.bmp,Video for Windows 1.1 Space,Video for Windows 1.1 CD-ROM",cmoOvewrwrite
  394.      CreateIniKeyValue WinDir$ + "MBROWSER.INI", "Collections", "Video_for_Windows_1.1_Special", "VFW11SAMPLE,\SPECIAL.MBR,vidclip.bmp,Video for Windows 1.1 Special,Video for Windows 1.1 CD-ROM",cmoOvewrwrite
  395.      CreateIniKeyValue WinDir$ + "MBROWSER.INI", "Collections", "Video_for_Windows_1.1_Sports", "VFW11SAMPLE,\SPORTS.MBR,vidclip.bmp,Video for Windows 1.1 Sports,Video for Windows 1.1 CD-ROM",cmoOvewrwrite
  396.      CreateIniKeyValue WinDir$ + "MBROWSER.INI", "Collections", "Video_for_Windows_1.1_Compression_Comparison", "VFW11SAMPLE,\COMPRESS.MBR,vidclip.bmp,Video for Windows 1.1 Compression Comparison,Video for Windows 1.1 CD-ROM",cmoOvewrwrite
  397.      CreateIniKeyValue WinDir$ + "MBROWSER.INI", "Collections", "Video_for_Windows_1.1_The_Wild_West", "VFW11SAMPLE,\WILDWEST.MBR,funclip.bmp,Video for Windows 1.1 The Wild West,Video for Windows 1.1 CD-ROM",cmoOvewrwrite
  398.     End IF
  399.  
  400. IF ((NOT OnNT$ = "TRUE") AND MinorVer% < 50) THEN
  401.     Run ("regedit.exe /s " + MakePath(WinDir$, "mplayer.reg"))
  402.     Run ("regedit.exe /s " + MakePath(WinSysDir$, "OLE2.reg"))
  403.     Run ("regedit.exe /s " + MakePath(WinSysDir$, "cleanup.reg"))
  404. END IF
  405. '' Updating Progman Groups
  406.     CreateProgmanGroup "Video for Windows 1.1", "", cmoNone
  407.     ShowProgmanGroup  "Video for Windows 1.1", 1, cmoNone
  408. '' Mplayer
  409. IF ((NOT OnNT$ = "TRUE") AND MinorVer% < 50) THEN
  410.     CreateProgmanItem "Video for Windows 1.1", "Media Player", MakePath(WinDir$, "mplayer.exe"), "", cmoOverwrite
  411. END IF
  412. '' AVI sample file
  413.     IF File1 = 1 then
  414.        CreateProgmanItem "Video for Windows 1.1", "Sample Clip", MakePath(Dest$, "sample.avi"), "", cmoOverwrite
  415.     END IF
  416.  
  417. '' Readme.txt
  418.    CreateProgmanItem "Video for Windows 1.1", "Release Notes", MakePath(DEST$, "vfw.wri"), "", cmoOverwrite
  419.  
  420.     IF OPTCUR$ = "2" THEN
  421. '' Browser
  422.        CreateProgmanGroup "Accessories", "", cmoNone
  423.        ShowProgmanGroup  "Accessories", 1, cmoNone
  424.        CreateProgmanItem "Accessories", "Media Browser", MakePath(WinDir$, "mbrowser.exe"), "", cmoOverwrite
  425.  
  426. '' VidEdit
  427.        CreateProgmanItem "Video for Windows 1.1", "VidEdit", MakePath(DEST$,"videdit.exe"), "", cmoOverwrite
  428. '' VidCap
  429.        CreateProgmanItem "Video for Windows 1.1", "VidCap", MakePath(DEST$,"vidcap.exe"), "", cmoOverwrite
  430. '' ScrnCap
  431.        CreateProgmanItem "Video for Windows 1.1", "Screen Capture", MakePath(DEST$,"capscrn.exe"), "", cmoOverwrite
  432.     END IF
  433.     Run ("profdisp.exe")   
  434. END SUB
  435.  
  436. '**
  437. '** Purpose:
  438. '**     Appends a file name to the end of a directory path,
  439. '**     inserting a backslash character as needed.
  440. '** Arguments:
  441. '**     szDir$  - full directory path (with optional ending "\")
  442. '**     szFile$ - filename to append to directory
  443. '** Returns:
  444. '**     Resulting fully qualified path name.
  445. '*************************************************************************
  446. FUNCTION MakePath (szDir$, szFile$) STATIC AS STRING
  447.     IF szDir$ = "" THEN
  448.     MakePath = szFile$
  449.     ELSEIF szFile$ = "" THEN
  450.     MakePath = szDir$
  451.     ELSEIF MID$(szDir$, LEN(szDir$), 1) = "\" THEN
  452.     MakePath = szDir$ + szFile$
  453.     ELSE
  454.     MakePath = szDir$ + "\" + szFile$
  455.     END IF
  456. END FUNCTION
  457.